home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Web Graphics with Shout 3D
/
Interactive Web Graphics With Shout 3D.iso
/
pc
/
Shout3Ddemo
/
Shout3d_runtime
/
codebase
/
models
/
BooleanEventToCurrentTimeTest.s
< prev
next >
Wrap
Text File
|
2000-11-10
|
2KB
|
88 lines
#VRML V2.0 utf8
WorldInfo {
title "Spazz3D"
info [
"This VRML World was created with Spazz3D, a VRML 97 authoring tool"
"www.spazz3d.com"
]
}
DEF DUMMY Transform{
children[
DEF dad_Box1 Transform {
translation -1.87176 0.86 0.0
rotation 0.865 0.503 0.0 0.684
children [
DEF BOX1_TOUCHSENSOR TouchSensor{}
DEF Box1 Shape {
appearance Appearance {
material DEF Red_mat Material {
diffuseColor 1.0 0.0 0.0
}
}
geometry IndexedFaceSet {
solid TRUE
creaseAngle 1.047
coord Coordinate {
point [
-0.50000 0.50000 -0.50000
-0.50000 0.50000 0.50000
0.50000 0.50000 0.50000
0.50000 0.50000 -0.50000
-0.50000 -0.50000 -0.50000
-0.50000 -0.50000 0.50000
0.50000 -0.50000 0.50000
0.50000 -0.50000 -0.50000
]
}
coordIndex [
0 1 2 -1
0 2 3 -1
1 5 6 -1
1 6 2 -1
2 6 7 -1
2 7 3 -1
3 7 4 -1
3 4 0 -1
0 4 5 -1
0 5 1 -1
6 5 4 -1
6 4 7 -1
]
}
}
]
}
]
}
DEF Light1 DirectionalLight {
ambientIntensity 0.000
intensity 1.000
direction 0.99489 0.08952 0.04676
color 1.0 1.0 1.0
on FALSE
}
DEF ANIMATION TimeSensor{cycleInterval 1}
DEF INTERP PositionInterpolator {
key [0 0.5 1]
keyValue [ 0 0 0 0 1 0 0 0 0 ]
}
ROUTE ANIMATION.fraction TO INTERP.fraction
ROUTE INTERP.value TO DUMMY.translation
DEF BOOLEAN_TO_TIME BooleanEventToCurrentTime{}
# This ROUTE will trigger the animation on any boolean value
ROUTE BOX1_TOUCHSENSOR.isOver TO BOOLEAN_TO_TIME.booleanField
# This ROUTE will trigger the animation only on true values
#ROUTE BOX1_TOUCHSENSOR.isOver TO BOOLEAN_TO_TIME.trueFilter
# This ROUTE will trigger the animation only on false values
#ROUTE BOX1_TOUCHSENSOR.isOver TO BOOLEAN_TO_TIME.falseFilter
ROUTE BOOLEAN_TO_TIME.currentTime TO ANIMATION.startTime